﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WPF_RoleManager_Demo.Models;

namespace WPF_RoleManager_Demo.Service
{
    public class PermissionManager
    {
        private readonly User _currentUser;

        public PermissionManager(User currentUser)
        {
            _currentUser = currentUser;
        }

        public bool HasPermission(UserRole requiredRole)
        {
            return _currentUser.Role == requiredRole;
        }
    }
}
